package com.itheima.demo;

import java.io.IOException;
import java.net.*;

/**
 * @author Zhang_Han
 * @version 1.0
 * @date 2020/7/16 11:38
 */
public class Demo_UDP_02 {
    public static void main(String[] args) throws IOException {
        DatagramSocket ds = new DatagramSocket();
        byte[] bytes = "茉莉蜜茶!".getBytes();
        ds.send(new DatagramPacket(bytes, bytes.length, InetAddress.getByName("127.0.0.1"), 10014));
        ds.close();

    }
}
